<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="../include/admincontent.jsp" %>
<div id="Content">
    <form id="gxexcelValid" method="post" action="/ExUser/importaction" enctype="multipart/form-data">
        <table class="treeTable searchform">
            <thead>
            <tr>
                <td width="60">选择文件：</td>
                <td width="200">
                    <div>
                        <input type="file" name="excel" datatype="*" nullmsg="请选择excel文件！"/>
                    </div>
                </td>
                <td><a href="/resources/template/人员信息导入格式.xls">点击下载Excel模版文件</a></td>
            </tr>
            <tr>
                <td>&nbsp;</td>
                <td>
                    <button type="submit" class="save">提 交</button>
                </td>
                <td></td>
            </tr>
            </thead>
        </table>
    </form>
</div>
<script type="text/javascript">
    $(document).ready(function () {
        $("#gxexcelValid").Validform({
            ajaxPost: true,
            beforeSubmit: function (curform) {
                curform.ajaxSubmit({
                    type: 'post',
                    dataType: 'json',
                    success: function (data) {
                        $.Showmsg(data.Message);
                        if (data.state) {
                            parent.getList();
                            var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
                            parent.layer.close(index);
                        }
                    }
                });
                return false;
            }
        });

    });
</script>
</body>
</html>